package com.kefu.call.vo;

import java.util.Date;
import org.apache.commons.lang3.StringUtils;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.kefu.common.vo.AbstractSearchVo;
import com.kefu.call.model.CdrRghistory;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @author CodeGenerator
 * @date 2022/07/26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "计费_充值表")
public class CdrRghistorySearchVo extends AbstractSearchVo {

    @ApiModelProperty(value = "客户ID")
    private String company;
    @ApiModelProperty(value = "充值金额")
    private String rgmoney;
    @ApiModelProperty(value = "充值时间")
    private Date createtime;
    @ApiModelProperty(value = "操作人")
    private String rgpeopel;

	 @Override
    public  LambdaQueryWrapper<CdrRghistory> lambdaQuery(){
    	LambdaQueryWrapper<CdrRghistory> wrapper=Wrappers.<CdrRghistory>lambdaQuery();
		wrapper.eq(company!=null, CdrRghistory::getCompany, company);//客户ID
	    wrapper.eq(StringUtils.isNotBlank(rgmoney), CdrRghistory::getRgmoney, rgmoney);//充值金额
		wrapper.eq(createtime!=null, CdrRghistory::getCreatetime, createtime);//充值时间
	    wrapper.eq(StringUtils.isNotBlank(rgpeopel), CdrRghistory::getRgpeopel, rgpeopel);//操作人
	    
    	return wrapper;
	}
}